<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
		<%
		String path = request.getContextPath();
		String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
		%>
		
		<!DOCTYPE HTML>
		<html>
			  <head>
			    <base href="<%=basePath%>">  
			    <title></title>
			    
			    <script src="js/jquery-2.1.4.min.js"> </script>
			    <script src="js/echarts.js"></script>
			    <script>
			     $(function(){
			    	   render();   
			       });
			      
			       //从远程提取数据
			       function render(){
			    	   $.ajax({
			    		   url:"MR_uniqueServlet",
			    		   dataType:"json",
			    		   data:{filePath:'${param.filePath}'},
			    		   success: function(wordCountList){
			    			   var array1=new Array();
			    			   for(var i=0;i<=wordCountList.length;i++){
				    				if(wordCountList[i]){
				    					 array1.push(wordCountList[i].word);}
				    				  
			    				}
			    			   var wordContainer = $("#word-container");
			    			    wordContainer.empty(); // 清除之前的列表
			    			    for (var word of array1) {
			    			        wordContainer.append("<li>" + word + "</li>");
			    			    }
			    			  }
			    	   }
			    	 );
			       }
			       
			   	
			   
			    </script>
			  </head>
			 <body>
   <div>
   <cite style="color:#A30014;font-weight:bold;font-family: 'Montserrat', sans-serif" >
    <a href="javascript:window.history.back()"  >
	  <img  width="25" src="images/fileIcons/back.png"  ></a>
    &nbsp; &nbsp;  &nbsp;  &nbsp; MR-去重复示例    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;>${param.filePath} 去重复词: </cite>
    <hr />
    <ui id="word-container">
    </ui>
   </div>

</body>

		</html>

